package com.yiquan.video.client;

import com.yiquan.video.pojo.UserActivity;
import entity.Result;
import entity.StatusCode;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author Tyrone
 * @date 2021/12/31 0:11
 */
@FeignClient(value = "yiquan-user")
public interface UserClient {

    @RequestMapping(value = "/user/getUserByUserId", method = RequestMethod.GET)
    public Result findByUserId(@RequestParam Long userId);


    @RequestMapping(value = "/user/updateUserWorkNums", method = RequestMethod.GET)
    public Result updateUserWorkNums(@RequestParam Long userId, @RequestParam Integer num);


    @RequestMapping(value = "/user/search", method = RequestMethod.POST)
    public Result findSearch(@RequestBody Map searchMap);

    @RequestMapping(value = "/user/getUserActivity", method = RequestMethod.GET)
    public Result getUserActivityAll(@RequestParam Long userId, @RequestParam Integer status);

    @GetMapping("/user/getFriendListUserId")
    public Result getFriendListUserId(@RequestParam Long userId, @RequestParam Integer status);

    @GetMapping("/user/isFollow")
    public Result isFollowTheUserByUserId(@RequestParam("userId") Long userId, @RequestParam Long theUserId);

    @PostMapping("/user/addUserActivity")
    public Result addUserActivity(@RequestBody UserActivity userActivity);

}
